<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script th:src="@{/utils/jquery-1.11.0.min.js}"></script>
    <script th:src="@{/utils/share.js}"></script>

</head>
<body>

<button onclick="shareQQ()">分享到QQ</button>
<button onclick="shareWX()">分享到WX</button>
<script th:src="@{/utils/share.js}"></script>
<script>
    options = {
        url: 'https://developers.weixin.qq.com/doc/offiaccount/Getting_Started/Global_Return_Code.html',
        title: '测试标题',
        content: '测试内容',
        pic: 'https://www.baidu.com/link?url=f3EoF26NW5jbrrDEyMcOWK5ajoBdvkUy3LTMJ-i1XBnZCucR-GwBqlgI87wVhb8D6K8TiAdUugrlSWIfcIm9enVvKvsW6cVBU9PYbFz9FBQ_G1pU2RMvnkrrssQGrN5_T8owE2c5D_MRqkYskSvZ-BpZt6TuL3fLhr9p0iY_xNTxchxJvjnQqnPJWfcFR7By1zz8Sr9sJtZR3gQzyAx9SOasYM3u2AkCPZS6-56hetVhWLRyyZLyJQDJXnHaFwCSpUt8SICSL8Ilw7m4y-6RH6SDNh72zV9n_UICrkEpdUdYjvpTnLK3e2381OutmD4GxPHxteNUM1TnERoAofITJ_lfv01iNHHQVjw77bINOUXOBhXn9HP348StV3nzABK9o5peSiE2ajapJ0w5y8zHzXTX7vtYN-W_2IHa4iEHOvj1HbRk0USrwWdpMzHeDYETCNWNBtVS1hS6upY1guiN5uMvaNbM-nfNIxUG-JViRPBdLUAKjSQ2QFG_uUuSdSdsJhk_3fsMdteHCK2PpsmKhGWVqM3W-kLhTB-tcf_rqqu38XJlNTFfZy0jbNppqCLrnwBYtv1ENyU0yRWLssYcKjr9bjZ3Md_aS94jE0fDT73&click_t=1610500854210&s_info=1381_694&wd=&eqid=f32543b20067a340000000045ffe4af3'
    };

    function shareQQ() {
        window.tQQ(this, options)
    }
    function shareWX() {
        window.weixinShare(this, options)
    }
</script>
</body>
</html>